<!--title-->
<div class="mnav1">
	<div class="m_nav">
		<div class="nav_left">
			<em class="home_icon"><?=$this->sys_name?></em><span>&nbsp;&gt;&nbsp;</span><font><?=$this->title?></font>
		</div>
	</div>
</div>

<div class="content-table">
	<div class="content-table-title"><b><?=$this->title?></b>：&nbsp;&nbsp;&nbsp;&nbsp;[<?=$this->data['contract_sid']?>] <?=$this->data['client_name']?></div>
<br />
<form action="/contracts/invoice-edit-submit" method="post" name="form1" onsubmit="submitform(this);return false;">
<div class="form-edit-task">
<table border="1" width="100%">
	<tr>
		<td align="right">申请票种：</td>
		<td align="left">&nbsp;<?=1==$this->data['invoice_type']?"专用发票":"普通发票"?></td>
	</tr>
	<tr>
		<td align="right" width="30%">公司全称：</td>
		<td align="left">&nbsp;<?=$this->data['company_name']?></td>
	</tr>
	<tr>
		<td align="right" width="30%">纳税人识别号：</td>
		<td align="left">&nbsp;<?=$this->data['tax_number']?></td>
	</tr>
	<tr>
		<td align="right">注册地址及电话：</td>
		<td align="left">&nbsp;<?=$this->data['register_address']?></td>
	</tr>
	<tr>
		<td align="right">开户银行：</td>
		<td align="left">&nbsp;<?=$this->data['bank_name']?></td>
	</tr>
	<tr>
		<td align="right">开户银行账号：</td>
		<td align="left">&nbsp;<?=$this->data['bank_number']?></td>
	</tr>
	<tr>
		<td align="right">联系人：</td>
		<td align="left">&nbsp;<?=$this->data['contact_name']?></td>
	</tr>
	<tr>
		<td align="right">联系电话：</td>
		<td align="left">&nbsp;<?=$this->data['tel']?></td>
	</tr>
	<tr>
		<td align="right">收件地址：</td>
		<td align="left">&nbsp;<?=$this->data['contact_address']?></td>
	</tr>
	<tr>
		<td align="right">申请人：</td>
		<td align="left">&nbsp;<?=$this->data['sales_emp_name']?></td>
	</tr>
	<tr>
		<td align="right">申请时间：</td>
		<td align="left">&nbsp;<?=$this->data['ctime']?></td>
	</tr>
	<tr>
		<td align="right">开票时间：</td>
		<td align="left">&nbsp;<?=$this->data['end_time']?></td>
	</tr>
	<tr>
		<td align="right">营业执照复印件：</td>
		<td align="left">&nbsp;<a href="/upload/signers/<?=$this->data['img1']?>" target="_blank"><img src="/upload/signers/<?=$this->data['img1']?>" height="70" alt="点击看大图" title="点击看大图" /></a></td>
	</tr>
	<tr>
		<td align="right">开户许可证复印件：</td>
		<td align="left">&nbsp;<a href="/upload/signers/<?=$this->data['img3']?>" target="_blank"><img src="/upload/signers/<?=$this->data['img3']?>" height="70" alt="点击看大图" title="点击看大图" /></a></td>
	</tr>
	<tr>
		<td align="right">一般纳税人认定书：</td>
		<td align="left">&nbsp;<a href="/upload/signers/<?=$this->data['img4']?>" target="_blank"><img src="/upload/signers/<?=$this->data['img4']?>" height="70" alt="点击看大图" title="点击看大图" /></a></td>
	</tr>
	<tr>
		<td align="center" colspan="2"><b>以下为操作区</b></td>
	</tr>
	<tr>
		<td align="right">状态：</td>
		<td align="left">&nbsp;
			<select name="status" id="status">
				<option value="1" <?php if(1==$this->data['status']){echo "selected='selected'";}?>>待开票</option>
				<option value="2" <?php if(2==$this->data['status']){echo "selected='selected'";}?>>已开票</option>
				<option value="3" <?php if(3==$this->data['status']){echo "selected='selected'";}?>>已作废</option>
			</select>
		</td>
	</tr>
	<tr>
		<td align="right">发票号码：</td>
		<td align="left">&nbsp;<input type="text" placeholder="发票号码" name="invoice_num" id="invoice_num" value="<?=$this->data['invoice_num']?>" style="width: 300px"></td>
	</tr>
	<tr>
		<td align="right">快递公司：</td>
		<td align="left">&nbsp;
			<select name="carrier_id" id="carrier_id">
				<option value="">请选择</option>
				<?php foreach($this->carriers as $carrier_id => $carrier_name):?>
				<option value="<?=$carrier_id?>" <?php if($carrier_id==$this->data['carrier_id']){echo "selected='selected'";}?>><?=$carrier_name?></option>
				<?php endforeach;?>
			</select>
		</td>
	</tr>
	<tr>
		<td align="right">物流单号：</td>
		<td align="left">&nbsp;<input type="text" placeholder="物流单号" name="carrier_tracking_num" id="carrier_tracking_num" value="<?=$this->data['carrier_tracking_num']?>" style="width: 300px"></td>
	</tr>
</table>

<br /><br />
<table border="1" width="100%">
	<tr>
		<th>产品名称</th>
		<th>发票内容</th>
		<th>版本</th>
		<th>数量</th>
		<th>合同总金额</th>
		<th>本次开票金额</th>
	</tr>
	<?php if($this->skus):?>
	<?php foreach($this->skus as $sku_arr):?>
	<tr>
		<td><?=$sku_arr['product_name']?></td>
		<td><?=$this->invoice_names_arr[$sku_arr['sku_invoice_name']]?></td>
		<td><?=$this->invoice_versions_arr[$sku_arr['sku_invoice_version']]?></td>
		<td><?=$sku_arr['quantity']?></td>
		<td><?=$sku_arr['actual_pay']?></td>
		<td><?=$sku_arr['apply_value']?></td>
	</tr>
	<?php endforeach;?>
	<?php endif;?>
</table>
<table border="0" width="100%">
	<tr>
		<td colspan="2" align="center"><br><br><input type="hidden" name="invoice_id" value="<?=$this->data['id']?>" /><input type="button" class="buttonlong" value="更新开票申请" onclick="submitform();return false;" /></td>
	</tr>
</table>
</div>
<br /><br />
</form>
<br/><br/>
</div>

<script>
<?php if($this->msg):?>
alert("<?=$this->msg?>, 信息提交失败, 请修改后再次提交。");
<?php endif;?>

function submitform() 
{
	form1.submit();
}
</script>
